package com.zzl.bonds.ticket.constant.type;

/**
 * @author : spp
 * @date : 2022/2/17 19:32
 */
public enum CreditUseTypeEnum {

    OPEN_CREDIT(1, "开立额度"),

    FINANCE_CREDIT(2, "融资额度");

    private Integer code;
    private String value;


    CreditUseTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (CreditUseTypeEnum statusEnum : CreditUseTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
